#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

/*Test numHandcards. */
int main(){

  struct gameState state;
  int i;
  int n;
  int fail;
  SelectStream(2);
  PutSeed(3);

  //No more than 12 provinces or if three supplycount are zero then game end.
  printf("Testing numHandCards\n");
  for (n = 0; n < 2000; n++) {
    for(i=0; i<4; i++){
      state.whoseTurn = i;
      state.handCount[i] = floor(Random()*MAX_HAND);
      if(numHandCards(&state) != state.handCount[i]){
        printf("Test FAILED \n");
        fail++;
      }else{
        printf("Test PASSED\n");
      }
    }

  }

  printf("numHandcards Summary: %i tests failed. %i percent failure rate", fail, fail/2000);




}
